import App from './App'

import enlargePopup from '@/components/enlargePopup/enlargePopup.vue'
// 放大图片组件
Vue.component('enlargePopup', enlargePopup)

import verify from '@/common/js/verify.js'
import Filter from '@/common/js/filter.js'
import utils from '@/common/js/utils.js'
import tools from '@/common/js/tools.js'
import api from '@/common/js/network/api.js'
import mixin from '@/common/js/mixin.js'
import NoData from '@/components/noData/noData.vue'
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
import store from "./store"
// import wx from 'weixin-js-sdk'
// 引入uview
// import uView from 'uview-ui'
// Vue.use(uView)

import uView from '@/uni_modules/uview-ui'
Vue.use(uView)


// 配置uview默认单位为rpx
uni.$u.config.unit = 'rpx'

Vue.prototype.$store = store
// Vue.prototype.$wx = wx




Vue.mixin(mixin)

Vue.component('noData',NoData)
Vue.component('uniLoadMore',uniLoadMore)

const obj = {
	verify,
	utils,
	tools,
	api
}
for (const key in obj) {
	Object.defineProperty(Vue.prototype, `$${key}`, {
		get: () => obj[key]
	})
}
Object.keys(Filter).forEach(key => Vue.filter(key, Filter[key]))

// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
    ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif